package com.ruoyi.service.service.impl;

import com.ruoyi.service.domain.ServiceItemscombo;
import com.ruoyi.service.mapper.ServiceItemscomboMapper;
import com.ruoyi.service.service.IServiceItemscomboService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 服务项目与套餐对应Service业务层处理
 * 
 * @author ZDL
 * @date 2024-10-21
 */
@Service
public class ServiceItemscomboServiceImpl implements IServiceItemscomboService 
{
    @Autowired
    private ServiceItemscomboMapper serviceItemscomboMapper;

    /**
     * 查询服务项目与套餐对应
     * 
     * @param itemscomboId 服务项目与套餐对应主键
     * @return 服务项目与套餐对应
     */
    @Override
    public ServiceItemscombo selectServiceItemscomboByItemscomboId(Long itemscomboId)
    {
        return serviceItemscomboMapper.selectServiceItemscomboByItemscomboId(itemscomboId);
    }

    //@Override
    //public ServiceItemscombo selectServiceItemscomboByItemscomboUserId(Long itemscomboUserId) {
    //    return serviceItemscomboMapper.selectServiceItemscomboByItemscomboUserId(itemscomboUserId);
    //}

    /**
     * 查询服务项目与套餐对应列表
     * 
     * @param serviceItemscombo 服务项目与套餐对应
     * @return 服务项目与套餐对应
     */
    @Override
    public List<ServiceItemscombo> selectServiceItemscomboList(ServiceItemscombo serviceItemscombo)
    {
        return serviceItemscomboMapper.selectServiceItemscomboList(serviceItemscombo);
    }

    /**
     * 新增服务项目与套餐对应
     * 
     * @param serviceItemscombo 服务项目与套餐对应
     * @return 结果
     */
    @Override
    public int insertServiceItemscombo(ServiceItemscombo serviceItemscombo)
    {
        return serviceItemscomboMapper.insertServiceItemscombo(serviceItemscombo);
    }

    /**
     * 修改服务项目与套餐对应
     * 
     * @param serviceItemscombo 服务项目与套餐对应
     * @return 结果
     */
    @Override
    public int updateServiceItemscombo(ServiceItemscombo serviceItemscombo)
    {
        return serviceItemscomboMapper.updateServiceItemscombo(serviceItemscombo);
    }

    /**
     * 批量删除服务项目与套餐对应
     * 
     * @param itemscomboIds 需要删除的服务项目与套餐对应主键
     * @return 结果
     */
    @Override
    public int deleteServiceItemscomboByItemscomboIds(Long[] itemscomboIds)
    {
        return serviceItemscomboMapper.deleteServiceItemscomboByItemscomboIds(itemscomboIds);
    }

    /**
     * 删除服务项目与套餐对应信息
     * 
     * @param itemscomboId 服务项目与套餐对应主键
     * @return 结果
     */
    @Override
    public int deleteServiceItemscomboByItemscomboId(Long itemscomboId)
    {
        return serviceItemscomboMapper.deleteServiceItemscomboByItemscomboId(itemscomboId);
    }
}
